home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 May: Tool Chest / Dev.CD May 00 TC.toast / pc / tool chest / testing & debugging / memhell / memhell 1.0a6 readme
Encoding:
Text File  |  1999-10-04  |  3.5 KB  |  36 lines

  1. MemHell
  2. Copyright (©) Apple Computer 1991, 1999
  3. All Rights Reserved
  4. By Ian Hendry
  5.  
  6. I wrote MemHell to stress memory management in ways that Macsbug heap scramble would not.  MemHell patches out most memory manager routines that might move or purge memory and, when these routines are called, MemHell calls MaxMem with a large request.  Calling MaxMem forces all purgable memory blocks to be purged and memory to be compacted.  MemHell should help bring out problem with stale de-referenced handles and purgable blocks that would otherwise show up as difficult to reproduce bugs.
  7.  
  8. Under many circumstances, MemHell is really annoying because it slows your machine to a crawl.  Moderm machines take a much less noticable performance hit (although you might want to stay away from desktop pictures because they are purgable and must be reloaded whenever the desktop is drawn with MemHell installed).  You can prevent MemHell from loading by holding down the mouse button when extensions are loading.  You can temporarily disable MemHell at any time by holding down the control key or the CapsLock key but not both (allows MemHell to stress things that require the control key to be down). 
  9.  
  10. MemHell also checks that you are not calling the Memory Manager traps with the inturrupt level set to anything except 0.  In System 9.0 and later MemHell reports more interrupt unsafe use of MemoryMgr even if the interrupt level is 0.  MemHell reports calls during deferred tasks, vertical blanking routines and secondary interrupt handlers.  MemHell does not check all memory manager calls so it will not catch all problems of this nature.  Also, it will not catch latent problems where a call is being made to something that is allowed to move memory but does not actually do it.  A patch or a change to the OS can bring out such problems in the future (for example the GetKeys problem fixed in MemHell A6 is described below).
  11.  
  12. If you get an interrupt message from MemHell, you should temporarily disable MemHell before tracing in Macsbug (by using the caps lock key).  Stressing the heaps at this point can easily cause enough damage to hang Macsbug.  Once MemHell is temporarily disabled, you can look around to see what's going on.
  13.  
  14. MemHell looks for a resource to configure the minimum size of block for which it will compress memory (set by default to be 0).  Open MemHell extension with ResEdit, if you add a resource of type 'gVar' containing a longint size, then MemHell will not trigger memory compaction on blocks smaller than that size.
  15.  
  16. MemHell will not compact memory when setting a handle or pointer to a smaller size.
  17.  
  18. Traps that may move memory, but not patched by this version of MemHell:
  19.     ResrvMem, ReallocHandle, NewEmptyHandle, and EmptyHandle
  20.  
  21. --------- RELEASE NOTES --------------
  22. MemHell A5:
  23.  
  24. Remove a bogus dependency on GetResource setting the Z flag.  New PCI Macintoshes have a native Resource Manager that does not set the Z flag.
  25.  
  26. MemHell A6 (September 30, 1999):
  27.  
  28. MemHell assumed that GetKeys did not move memory.  In the past GetKeys did not move memory but it was always on the list of traps that could.  MemHell no longer calls GetKeys.
  29.  
  30. Added reentrancy protection for MaxMem patches that allocate Memory.  There are no known patches of this type but it would have been broken MemHell.
  31.  
  32. Improved interrupt checking on System 9.0 and later.
  33.  
  34. Changed MemHell to temporarily disable itself based on the CapsLock key or the control key (but not both).
  35.  
  36. Added Macsbug symbols so we show up better on stack crawls.  Don't blame the messager.